/**
 * @author [siwi]
 * @email [siwi@siwi.me]
 * @create date 2017-09-02 02:44:46
 * @modify date 2017-09-02 02:44:46
 * @desc [oauth 客户端]
*/

const { mongoose, Schame } = require('./Mongoose')

const OauthClient = new Schame({
    name: {
        type: String,
        unique: true,
        required: true,
    },
    user_id: {
        type: String,
        required: true,
    },
    secret: {
        type: String,
        unique: true
    },
    redirect_uri: {
        type: String
    },
    revoked: {
        type: Number,
        default: 0
    }
})

module.exports = mongoose.model('OauthClient', OauthClient)